import { DELETE_USER, GET_USER_LIST } from "../types/user";

export const getUserList = () => dispath => dispath({
    type: GET_USER_LIST,
    payload: fetch('http://localhost:8000/user/list').then(res => res.json())
});

export const deleteUser = (userId) => {
    return {
        type: DELETE_USER,
        payload: userId
    }
}